<h3>Description</h3>
<p><p>If n is a positive integer while it is not a square number, the continued fraction of its square root is interesting ---- sqrt(n) = ( a0, a1 a2 a3 ... am )<br />e.g. Sqrt(3)=<br><img width="290px" height="200px" src="problems/b1.jpg" /><br />It can be represented as sqrt(3) = ( 1, 1 2 );<br />It can be confirmed that:<br /> <img src="problems/b2.jpg" /><br />now input a natural number n, please output its continued fraction.</p></p>
<h3>Input</h3>
<p><p>First line contains a number t, indicate the number of test case.<br />Following t lines, each line contains a positive number n ( 0 &lt; n &lt; 10000 ).</p></p>
<h3>Output</h3>
<p><p>If n can NOT be expanded as a continued fraction, output "Error!"<br />If n can be expanded as a continued fraction, output its continued fraction as following format:<br />Output a0, then a dot and a blankspace.<br />Output following m number separated by a blankspace.<br />NOTICE: No blankspace after the last number.</p></p>
<h3>Sample Input</h3>
<p><p>4<br />3<br />4<br />13<br />30</p></p>
<h3>Sample Output</h3>
<p><p>1, 1 2<br />Error!<br />3, 1 1 1 1 6<br />5, 2 10</p></p>
<h3>Source</h3>
<p>Chen, Mingxia</p>
<h3>Hint</h3>
<p><p>Sqrt(x) means the Square root of x.<br />[x] is the max number that not larger than x.</p></p>
